{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=1445
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	m,n,x,y:int64;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(m,n,x,y);
if x>1 then writeln(x-1,' ',y);
if x<m then writeln(x+1,' ',y);
if y>1 then writeln(x,' ',y-1);
if y<n then writeln(x,' ',y+1);
end.